home *** CD-ROM | disk | FTP | other *** search
/ How Would You Survive? / How Would You Survive (1995)(Grolier)[Mac-PC].iso / mac / SHARED.DIR / 01949_Script_Aztec Global Buttons < prev    next >
Text File  |  1995-09-13  |  9KB  |  268 lines

  1. Global gBtn1, gBtn2, gBtn3, gBtn4, gBtn5, gBtn6, gBtn7, gBtn8, gBtn9, ¼
  2. gBtn16, gBtn18, gNewMarker, gTheHelpIsOn, gQuest
  3.  
  4. on AInitBYLDemo
  5.   set gBtn4 = birth(script "aTheatreButton", 32, 140, "SA141000.AIF", "ABegin", "HandCursor")
  6. end
  7.  
  8. on AInitGlobals
  9.   set ScriptNumber = the number of cast "a3StateButton"
  10.   set gBtn1 = birth(script "aPullDown", 29, 125, 127, "SA140800.AIF", "DoNothing", "DoNothing", "HandCursor")
  11.   set gBtn2 = birth(script ScriptNumber, 30, 134, "SA141700.AIF", "DoNothing", "HandCursor")
  12.   set gBtn3 = birth(script ScriptNumber, 31, 137, "SA141600.AIF", "DoNothing", "HandCursor")
  13.   set gBtn4 = birth(script ScriptNumber, 32, 140, "SA141000.AIF", "DoNothing", "HandCursor")
  14.   set gBtn5 = birth(script ScriptNumber, 33, 143, "SA141100.AIF", "DoNothing", "HandCursor")
  15.   set gBtn6 = birth(script 1983, 34, 146, 489, "DoNothing", "DoNothing", "DoNothing",¼
  16.                  "DoNothing", "HandCursor", "SA141200.AIF", "")
  17.   set gBtn7 = birth(script ScriptNumber, 35, 153, "SA141300.AIF", "DoNothing", "HandCursor")
  18.   set gBtn8 = birth(script ScriptNumber, 36, 156, "SA010150.AIF", "HelpToggle", "HandCursor")  
  19.   set gBtn9 = birth(script ScriptNumber, 37, 159, "SA141500.AIF", "Quitit", "HandCursor")
  20.   set gQuest = birth(script "aRandomQuestion", 44, 45, 148, 339, 173, 1501, 2, "",¼
  21.                    "", "", "", 2, "SA143000.AIF")
  22.   SwitchList (gQuest, 2)
  23. end
  24.  
  25. on AGlobalsSetUpFromTheatre
  26.   set ScriptNumber = the number of cast "a3StateButton"
  27.   set gBtn1 = birth(script "aPullDown", 29, 125, 127, "SA140800.AIF", "AGlossary", "AIndex", "HandCursor")
  28.   set gBtn2 = birth(script ScriptNumber, 30, 134, "SA141700.AIF", "DoNothing", "HandCursor")
  29.   set gBtn3 = birth(script ScriptNumber, 31, 137, "SA141600.AIF", "DoNothing", "HandCursor")
  30.   set gBtn4 = birth(script ScriptNumber, 32, 140, "SA141000.AIF", "ABegin", "HandCursor")
  31.   set gBtn5 = birth(script ScriptNumber, 33, 143, "SA141100.AIF", "Table", "HandCursor")
  32.   set gBtn6 = birth(script 1983, 34, 146, 489, "AMap", "ATime", "ABasicFacts",¼
  33.                  "HowDoWeKnow", "HandCursor", "SA141200.AIF", "")
  34.   set gBtn7 = birth(script ScriptNumber, 35, 153, "SA141300.AIF", "AGame", "HandCursor")
  35.   set gBtn8 = birth(script ScriptNumber, 36, 156, "SA010150.AIF", "HelpToggle", "HandCursor")  
  36.   set gBtn9 = birth(script ScriptNumber, 37, 159, "SA141500.AIF", "Quitit", "HandCursor")
  37.   SwitchList (gQuest, 2)
  38. end
  39.  
  40. on AGlobalsSetUp
  41.   setNewFunctions (gBtn1, "AGlossary", "AIndex")
  42.   setNewFunction (gBtn4, "ABegin")
  43.   setNewFunction (gBtn5, "Table")
  44.   setNewFunctions (gBtn6, "AMap", "ATime", "ABasicFacts", "HowDoWeKnow")
  45.   setNewFunction (gBtn7, "AGame")
  46.   setNewFunction (gBtn8, "HelpToggle")
  47.   SwitchList (gQuest, 2)
  48. end
  49.  
  50. on AGlobalsSetUpPan
  51.   setNewFunctions (gBtn1, "AGlossary", "AIndex")
  52.   setNewFunction (gBtn4, "DoNothing")
  53.   setNewFunction (gBtn5, "TableCross")
  54.   setNewFunctions (gBtn6, "AMap", "ATime", "ABasicFacts", "HowDoWeKnowCross")
  55.   setNewFunction (gBtn7, "AGame")
  56.   setNewFunction (gBtn8, "HelpToggle")
  57.   SwitchList (gQuest, 2)
  58. end
  59.  
  60. on AGlobalsSetUpGlossary
  61.   setNewFunctions (gBtn1, "DoNothing", "AIndex")
  62.   setNewFunction (gBtn2, "ABegin")
  63.   setNewFunction (gBtn3, "AIndex")
  64.   setNewFunction (gBtn4, "ABegin")
  65.   setNewFunction (gBtn5, "TableCross")
  66.   setNewFunctions (gBtn6, "AMap", "ATime", "ABasicFacts", "HowDoWeKnowCross")
  67.   setNewFunction (gBtn7, "AGame")
  68.   setNewFunction (gBtn8, "HelpToggle")
  69.   SwitchList (gQuest, 2)
  70. end
  71.  
  72. on AGlobalsSetUpIndex
  73.   setNewFunctions (gBtn1, "AGlossary", "DoNothing")
  74.   setNewFunction (gBtn2, "AGlossary")
  75.   setNewFunction (gBtn3, "ABegin")
  76.   setNewFunction (gBtn4, "ABegin")
  77.   setNewFunction (gBtn5, "TableCross")
  78.   setNewFunctions (gBtn6, "AMap", "ATime", "ABasicFacts", "HowDoWeKnowCross")
  79.   setNewFunction (gBtn7, "AGame")
  80.   setNewFunction (gBtn8, "HelpToggle")
  81.   SwitchList (gQuest, 2)
  82. end
  83.  
  84. on AGlobalsSetUpGame
  85.   setNewFunctions (gBtn1, "AGlossary", "AIndex")
  86.   setNewFunction (gBtn4, "ABegin")
  87.   setNewFunction (gBtn5, "TableCross")
  88.   setNewFunctions (gBtn6, "AMap", "ATime", "ABasicFacts", "HowDoWeKnowCross")
  89.   setNewFunction (gBtn7, "DoNothing")
  90.   setNewFunction (gBtn8, "HelpToggle")
  91.   SwitchList (gQuest, 2)
  92. end
  93.  
  94. on AGlobalsSetUpMap
  95.   setNewFunctions (gBtn1, "AGlossary", "AIndex")
  96.   setNewFunction (gBtn4, "ABegin")
  97.   setNewFunction (gBtn5, "TableCross")
  98.   setNewFunctions (gBtn6, "ResetAMaps", "ATime", "ABasicFacts", "HowDoWeKnowCross")
  99.   setNewFunction (gBtn7, "AGame")
  100.   setNewFunction (gBtn8, "HelpToggle")
  101.   SwitchList (gQuest, 2)
  102. end
  103.  
  104. on AGlobalsSetUpTime
  105.   setNewFunctions (gBtn1, "AGlossary", "AIndex")
  106.   setNewFunction (gBtn4, "ABegin")
  107.   setNewFunction (gBtn5, "TableCross")
  108.   setNewFunctions (gBtn6, "AMap", "DoNothing", "ABasicFacts", "HowDoWeKnowCross")
  109.   setNewFunction (gBtn7, "AGame")
  110.   setNewFunction (gBtn8, "HelpToggle")
  111.   SwitchList (gQuest, 2)
  112. end
  113.  
  114. on AGlobalsSetUpBF
  115.   setNewFunctions (gBtn1, "AGlossary", "AIndex")
  116.   setNewFunction (gBtn4, "ABegin")
  117.   setNewFunction (gBtn5, "TableCross")
  118.   setNewFunctions (gBtn6, "AMap", "ATime", "DoNothing", "HowDoWeKnowCross")
  119.   setNewFunction (gBtn7, "AGame")
  120.   setNewFunction (gBtn8, "HelpToggle")
  121.   SwitchList (gQuest, 2)
  122. end
  123.  
  124. on AGlobalRollover
  125.   RolloverJob(gQuest)
  126.   if (the MouseV < 250) then
  127.     if hilightPullDown (gBtn1) then 
  128.       return true
  129.     else
  130.       if ObjectP(gBtn16) then
  131.         if hilight (gBtn16) then 
  132.           return true
  133.         else
  134.           if ObjectP(gBtn18) then
  135.             if hilight (gBtn18) then 
  136.               return true
  137.             end if
  138.           end if
  139.         end if
  140.       end if
  141.     end if
  142.   else
  143.     if rollover(38) then
  144.       if gTheHelpIsOn = 1 then
  145.         puppetsound "SA142100.AIF"
  146.         updatestage
  147.         repeat while rollover(38)
  148.           nothing
  149.         end repeat
  150.       end if
  151.     else
  152.       if hilight (gBtn2) then 
  153.         return true
  154.       else
  155.         if hilight (gBtn3) then 
  156.           return true
  157.         else
  158.           if hilight (gBtn4) then 
  159.             return true
  160.           else
  161.             if hilight (gBtn5) then 
  162.               return true
  163.             else
  164.               if hilight (gBtn6) then 
  165.                 return true
  166.               else
  167.                 if hilight (gBtn7) then 
  168.                   return true
  169.                 else
  170.                   if hilight (gBtn8) then 
  171.                     return true
  172.                   else
  173.                     if hilight (gBtn9) then 
  174.                       return true
  175.                     else
  176.                       return false
  177.                     end if
  178.                   end if
  179.                 end if
  180.               end if
  181.             end if
  182.           end if
  183.         end if
  184.       end if
  185.     end if
  186.   end if
  187. end
  188.  
  189. on AGlobalRollover2
  190.   RolloverJob(gQuest)
  191.   if (the MouseV < 250) then
  192.     if hilightPullDown (gBtn1) then 
  193.       return true
  194.     else
  195.       if ObjectP(gBtn16) then
  196.         if hilight (gBtn16) then 
  197.           return true
  198.         else
  199.           if ObjectP(gBtn18) then
  200.             if hilight (gBtn18) then 
  201.               return true
  202.             end if
  203.           end if
  204.         end if
  205.       end if
  206.     end if
  207.   else
  208.     if rollover(38) then
  209.       if gTheHelpIsOn = 1 then
  210.         puppetsound "SA142100.AIF"
  211.         updatestage
  212.         repeat while rollover(38)
  213.           nothing
  214.         end repeat
  215.       end if
  216.     else
  217.       if donthilight (gBtn2) then 
  218.         return true
  219.       else
  220.         if donthilight (gBtn3) then 
  221.           return true
  222.         else
  223.           if hilight (gBtn4) then 
  224.             return true
  225.           else
  226.             if hilight (gBtn5) then 
  227.               return true
  228.             else
  229.               if hilight (gBtn6) then 
  230.                 return true
  231.               else
  232.                 if hilight (gBtn7) then 
  233.                   return true
  234.                 else
  235.                   if hilight (gBtn8) then 
  236.                     return true
  237.                   else
  238.                     if hilight (gBtn9) then 
  239.                       return true
  240.                     else
  241.                       return false
  242.                     end if
  243.                   end if
  244.                 end if
  245.               end if
  246.             end if
  247.           end if
  248.         end if
  249.       end if
  250.     end if
  251.   end if
  252. end
  253.  
  254.  
  255. on InitSoundsA
  256.   setnewsound (gBtn1, "SA140800.AIF")
  257.   setnewsound (gBtn2, "SA141700.AIF")
  258.   setnewsound (gBtn3, "SA141600.AIF")
  259.   setnewsound (gBtn4, "SA141000.AIF")
  260.   setnewsound (gBtn5, "SA141100.AIF")
  261.   setnewsound (gBtn6, "SA141200.AIF")
  262.   setnewsound (gBtn7, "SA141300.AIF")
  263.   setnewsound (gBtn8, "SA010150.AIF")
  264.   setnewsound (gBtn9, "SA141500.AIF")
  265.   setnewsound (gQuest, "SA143000.AIF")
  266. end
  267.  
  268.